class HistoricoInterno < ActiveRecord::Base
  belongs_to :usuario
  belongs_to :cargo
  belongs_to :sucursal
  belongs_to :categoria
  belongs_to :tipo_contrato
  belongs_to :motivo_salida
  
  validates_presence_of :usuario
  named_scope :ultimo, :conditions => ["hasta is null"]
  named_scope :ordenado_desc, :order => "desde DESC"
  named_scope :asc, :order => "desde asc"
end
